package eng.jTrussSolver.Node;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;


@XmlType(name = "Node", propOrder = { "NodeID","X","Y", "Z", "notMoveX", "notMoveY" })
@XmlAccessorType(XmlAccessType.FIELD)  
public class NodeData {
	public int NodeID;
	public double X,Y,Z ;
	public boolean notMoveX , notMoveY;
	private int _forcecounter;	
	
	public NodeData() {
		this.NodeID = 0;
		this.X = 0;
		this.Y = 0;
		this.Z = 0;
		this.notMoveX = false;
		this.notMoveY = false;
		this._forcecounter = 0;
	}
	/**
	 * Constructor gia NodeData
	 * @param ID: Node Data [int]
	 * @param X :
	 * @param Y :
	 * @param Z :
	 */
	@Deprecated
	public NodeData(int ID,double X,double Y,double Z) {
		this.NodeID = ID;
		this.X = X;
		this.Y = Y;
		this.Z = Z;
		this.notMoveX = false;
		this.notMoveY = false;
	}
	
	/**
	 * Constructor gia NodeData
	 * @param ID: Node Data [int]
	 * @param X :  
	 * @param Y :
	 * @param Z :
	 */
	public NodeData(int ID,double X,double Y,double Z,
			boolean notMoveX,boolean notMoveY) {
		this.NodeID = ID;
		this.X = X;
		this.Y = Y;
		this.Z = Z;
		this.notMoveX = notMoveX;
		this.notMoveY = notMoveY;
	}
	
	/**
	 * Returns the NodeID 
	 * @return [int] Node Identification number
	 */
	public int getNodeID() {
		
		return this.NodeID;
	}

	public String getNodeElementForcesTabAsString() {
		
		String str="";
		str += NodeID;
		str += ": ("+ X + " , ";
		str +=  Y + ")";
		
		return str;
		
	}
	
	public double getX() {
		
		return this.X;
	}
	
	public double getY() {
		
		return this.Y;
	}
	
    public double getZ() {
		
		return this.Z;
	}
  
	public void set(int ID, double X, double Y, double Z,boolean notMoveX,boolean notMoveY)

	{
		this.NodeID = ID;
		this.X = X;
		this.Y = Y;
		this.Z = Z;
		this.notMoveX = notMoveX;
		this.notMoveY = notMoveY;
	}


	public int getNodeForceCounter() {
		return this._forcecounter;
		
	}
	

}
